package com.atguigu.springboot.controller;

import com.atguigu.springboot.service.ISysMenuService;
import com.atguigu.springboot.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author admin
 * @create 2021-12-09 15:43
 */
@RestController
@RequestMapping("/menu")
public class SysMenuController {

    @Autowired
    private ISysMenuService sysMenuService;

    @GetMapping("/selectMenuAll")
    public R selectMenuAll(){
        return R.ok(sysMenuService.selectMenuAll());
    }

    @GetMapping("/getMenuTree")
    public R getMenuTree(){
        return R.ok(sysMenuService.getMenuTree());
    }
}
